<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.7</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <groupId>${parentPackage}</groupId>
    <artifactId>${moduleName}</artifactId>
    <packaging>pom</packaging>
    <version>1.0-SNAPSHOT</version>
    <description>allen学习案例大全</description>
    <inceptionYear>2025</inceptionYear>

    <modules>
        <module>api</module>
        <module>application</module>
        <module>domain</module>
        <module>infrastructure</module>
        <module>common</module>
    </modules>

    <properties>
        <allenStudy.version>1.0-SNAPSHOT</allenStudy.version>
        <java.version>1.8</java.version>
        <camunda.version>7.17.0</camunda.version>
        <mp.version>3.5.6</mp.version>
        <hutool.version>5.8.18</hutool.version>
        <modelmapper.version>3.1.1</modelmapper.version>
        <slf4j.version>1.7.36</slf4j.version>
        <freemarker.version>2.3.30</freemarker.version>
        <swagger.version>2.2.15</swagger.version>
        <springdoc.version>1.7.0</springdoc.version>
        <druid.version>1.2.23</druid.version>
        <mapstruct.version>1.5.5.Final</mapstruct.version>
        <lombok.version>1.18.30</lombok.version>
    </properties>
    <!-- 依赖管理：统一版本 -->
    <dependencyManagement>
        <dependencies>
            <!--注意检查mapper注解是不是mapstruct包下的，可能会错误的引入mybatis包-->
            <!--mapstruct-->
            <dependency>
                <groupId>org.mapstruct</groupId>
                <artifactId>mapstruct</artifactId>
                <version>${r"${mapstruct.version}"}</version>
            </dependency>
            <!--注解处理器-->
            <dependency>
                <groupId>org.mapstruct</groupId>
                <artifactId>mapstruct-processor</artifactId>
                <version>${r"${mapstruct.version}"}</version>
                <scope>provided</scope>
            </dependency>

        </dependencies>
    </dependencyManagement>
    <!-- 公共依赖（所有子模块继承） -->
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.camunda.bpm.springboot</groupId>
            <artifactId>camunda-bpm-spring-boot-starter</artifactId>
            <version>${r"${camunda.version}"}</version>
            <#--<version>${camunda.version}</version>-->
        </dependency>

        <dependency>
            <groupId>org.camunda.bpm.springboot</groupId>
            <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
            <version>${r"${camunda.version}"}</version>
            <#--<version>${camunda.version}</version>-->
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>

        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <version>${r"${mp.version}"}</version>
            <#--<version>${mp.version}</version>-->
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${r"${lombok.version}"}</version>
            <#--<scope>provided</scope>-->
        </dependency>

        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
            <version>${r"${hutool.version}"}</version>
            <#--<version>${hutool.version}</version>-->
        </dependency>

        <!-- spring-boot-starter-mail -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>

        <!-- ModelMapper -->
        <dependency>
            <groupId>org.modelmapper</groupId>
            <artifactId>modelmapper</artifactId>
            <version>${r"${modelmapper.version}"}</version>
            <#--<version>${modelmapper.version}</version>-->
        </dependency>

        <!-- Validation -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
        </dependency>

        <!-- SLF4J for logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${r"${slf4j.version}"}</version>
            <#--<version>${slf4j.version}</version>-->
        </dependency>

        <!--mbatis-plus代码生成器-->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-generator</artifactId>
            <version>${r"${mp.version}"}</version>
            <#--<version>${mp.version}</version>-->
        </dependency>

        <!--freemarker-->
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>${r"${freemarker.version}"}</version>
            <#--<version>${freemarker.version}</version>-->
        </dependency>

        <!--Swagger2-->
        <dependency>
            <groupId>io.swagger.core.v3</groupId>
            <artifactId>swagger-models</artifactId>
            <version>${r"${swagger.version}"}</version>
            <#--<version>${swagger.version}</version>-->
        </dependency>
        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-ui</artifactId>
            <version>${r"${springdoc.version}"}</version>
            <#--<version>${springdoc.version}</version>-->
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>${r"${druid.version}"}</version>
            <#--<version>${druid.version}</version>-->
        </dependency>


    </dependencies>

    <build>
        <plugins>
            <plugin>
                <!--在lombok还没有注入时，mapstruct加载不到getset，所以生成实现类失败。所以指定一下两个框架的加载顺序-->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>${r"${lombok.version}"}</version>
                        </path>
                        <path>
                            <groupId>org.mapstruct</groupId>
                            <artifactId>mapstruct-processor</artifactId>
                            <version>${r"${mapstruct.version}"}</version>
                        </path>
                        <!--从lombok1.18.16开始需要额外的注解处理器-->
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok-mapstruct-binding</artifactId>
                            <version>0.2.0</version>
                        </path>

                    </annotationProcessorPaths>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>